<?php
class PublicationMergePricesForm extends BasePublicationForm{
	const FORM_PRICES="prices";
	function configure(){	
	  $this->useFields(array("price"));
	  $prices= new sfForm();
	  foreach($this->getObject()->getAvailablePrices() as $key=>$pPrice){
	  	$price=new PublicatioPriceMergeCustomizationForm($pPrice);
	  	
	  	$prices->embedForm("price_".$pPrice->getId(),$price);
	  }
	  $this->embedForm(self::FORM_PRICES, $prices);
	  $this->mergePreValidator(new PublicationPricesValidator(array("form"=>$this)));
	}
	
}